home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Text / HTML / HTMLEXT / GUI / func.upload < prev    next >
Text File  |  2000-04-19  |  10KB  |  319 lines

  1. G4C
  2. ; $VER: func.upload Rev.017 © by Juan Manuel Wehrli 1999 - 2000
  3. WINBIG -1 -1 250 60 "Uploader"
  4. WinType 11010000
  5. WinBackground IMAGE BG 0
  6. Winout "NIL:"
  7. WinOnMouse 250 75
  8.  
  9. xOnLoad
  10.     SetGad #This 666 ON
  11.     lvuse HTMLEXT 1
  12.     EXTRACT %SiteDfue CLEAN Sitedfue
  13.     if $Sitedfue = "EIN"
  14.         CLI 'rx $*TCP ISONLINE $*TCPIF'
  15.         if $.htmlext.tmp = "0"
  16.             EZREQ "Zur Zeit besteht keine DFÜ Verbindung!\nSoll die DFÜ Verbindung hergestellt werden?" "_1 Ja weiter|_2 Nein" olreq
  17.             if $olreq = 1
  18.                 GuiLoad "HTMLEXT:gui/func.dfue"
  19.             endif
  20.         endif
  21.     endif
  22.     GuiOpen #This
  23.  
  24. Text 0 0 180 20 "Keine Aktivität ..." 30 BOX
  25.     GadFont "xHelvetica.font" "11" 000
  26.     GadID 1
  27.  
  28. Text 0 20 180 20 "Keine Aktivität ..." 30 BOX
  29.     GadFont "xHelvetica.font" "11" 000
  30.     GadID 2
  31.  
  32. Text 0 40 110 20 "Keine Aktivität ..." 30 BOX
  33.     GadFont "xHelvetica.font" "11" 000
  34.     GadID 3
  35.  
  36. xButton 180 0 70 20 "_1 FTP Work"
  37.     GadFont "xHelvetica.font" "11" 000
  38.     GadKey "x"
  39.     GuiWindow HTMLEXT WAIT
  40.     GuiWindow #This WAIT
  41.     SetVar stand "1"
  42.     lvuse HTMLEXT 1
  43.     EXTRACT %SitePath CLEAN slpath
  44.     EXTRACT %SiteFTPWRK CLEAN sfpath
  45.     EXTRACT %SiteServTyp CLEAN servertyp
  46.     LVUSE HTMLEXT 3
  47.     LVMulti First
  48.     while $$lv.line > ""
  49.         SetVar lokdir $$lv.dir
  50.         SetVar ftpdir $lokdir
  51.         RepVar ftpdir $slpath $sfpath CI
  52.         JoinFile $$lv.dir $$lv.rec lokfile
  53.         SetVar ftpfile $lokfile
  54.         repvar ftpfile $slpath $sfpath CI
  55.         if $ftpfile != $lokfile
  56.             if $lokfile != ""
  57.                 if $servertyp = "EIN"
  58.                     INFO FILE $lokfile
  59.                     if $$FILE.TYPE != "DIR"
  60.                         Update Infobar 1 "Lösche Datei $ftpfile ..."
  61.                         Update #This 1 "($stand) $$lv.rec"
  62.                         CLI 'delete $ftpfile'
  63.                         Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
  64.                         CLI 'copy $lokfile TO $ftpfile'
  65.                     else
  66.                         Update Infobar 1 "Lösche Verzeichnis $ftpfile ..."
  67.                         Update #This 1 "($stand)D $$lv.rec"
  68.                         EXTRACT lokdir FILE dirn
  69.                         CLI 'delete $ftpfile ALL'
  70.                         Update Infobar 1 "Erzeuge $dirn in $ftpdir ..."
  71.                         cli 'makedir $ftpdir $dirn'
  72.                         Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
  73.                         cli 'copy $lokfile TO $ftpfile ALL NOREQ'
  74.                     endif
  75.                 else
  76.                     INFO FILE $lokfile
  77.                     if $$FILE.TYPE != "DIR"
  78.                         Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
  79.                         Update #This 1 "($stand) $$lv.rec"
  80.                         CLI 'copy $lokfile TO $ftpfile'
  81.                     else
  82.                         EXTRACT lokdir FILE dirn
  83.                         Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
  84.                         Update #This 1 "($stand)D $$lv.rec"
  85.                         cli 'makedir $ftpdir $dirn'
  86.                         cli 'copy $lokfile TO $ftpfile ALL NOREQ'
  87.                     endif
  88.                 endif
  89.                 setvar stat 1
  90.             elseif $lokfile = ""
  91.                 setvar stat 0
  92.             endif
  93.         else
  94.             Update #This 1 "FTPAdresse stimmt nicht!"
  95.             GuiWindow HTMLEXT RESUME
  96.             GuiWindow #This RESUME
  97.             STOP
  98.         endif
  99.         LVMulti OFF
  100.         LVMulti Show
  101.         LVMulti First
  102.         Counter stand INC 1
  103.     endwhile
  104.     GuiWindow HTMLEXT RESUME
  105.     GuiWindow #This RESUME
  106.     if $stat = 1
  107.         Update "infobar" 1 "Upload erfolgreich durchgeführt."
  108.     else
  109.         Update "infobar" 1 "Upload konnte nicht durchgeführt werden!"
  110.     endif
  111.     GuiQuit #This
  112.  
  113.  
  114. xButton 180 20 70 20 "_2 FTP OL    "
  115.     GadFont "xHelvetica.font" "11" 000
  116.     GadKey "x"
  117.     GuiWindow HTMLEXT WAIT
  118.     GuiWindow #This WAIT
  119.     SetVar stand "1"
  120.     lvuse HTMLEXT 1
  121.     EXTRACT %SitePath CLEAN slpath
  122.     EXTRACT %SiteFTPOL CLEAN sfpath
  123.     EXTRACT %SiteServTyp CLEAN servertyp
  124.     LVUSE HTMLEXT 3
  125.     LVMulti First
  126.     while $$lv.line > ""
  127.         SetVar lokdir $$lv.dir
  128.         SetVar ftpdir $lokdir
  129.         RepVar ftpdir $slpath $sfpath CI
  130.         JoinFile $$lv.dir $$lv.rec lokfile
  131.         SetVar ftpfile $lokfile
  132.         repvar ftpfile $slpath $sfpath CI
  133.         if $ftpfile != $lokfile
  134.             if $lokfile != ""
  135.                 if $servertyp = "EIN"
  136.                     INFO FILE $lokfile
  137.                     if $$FILE.TYPE != "DIR"
  138.                         Update Infobar 1 "Lösche Datei $ftpfile ..."
  139.                         Update #This 2 "($stand) $$lv.rec"
  140.                         CLI 'delete $ftpfile'
  141.                         Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
  142.                         CLI 'copy $lokfile TO $ftpfile'
  143.                     else
  144.                         Update Infobar 1 "Lösche Verzeichnis $ftpfile ..."
  145.                         Update #This 2 "($stand)D $$lv.rec"
  146.                         EXTRACT lokdir FILE dirn
  147.                         CLI 'delete $ftpfile ALL'
  148.                         Update Infobar 1 "Erzeuge $dirn in $ftpdir ..."
  149.                         cli 'makedir $ftpdir $dirn'
  150.                         Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
  151.                         cli 'copy $lokfile TO $ftpfile ALL NOREQ'
  152.                     endif
  153.                 else
  154.                     INFO FILE $lokfile
  155.                     if $$FILE.TYPE != "DIR"
  156.                         Update Infobar 1 "Kopiere Datei $lokfile nach $ftpfile ..."
  157.                         Update #This 2 "($stand) $$lv.rec"
  158.                         CLI 'copy $lokfile TO $ftpfile'
  159.                     else
  160.                         EXTRACT lokdir FILE dirn
  161.                         Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
  162.                         Update #This 2 "($stand)D $$lv.rec"
  163.                         cli 'makedir $ftpdir $dirn'
  164.                         cli 'copy $lokfile TO $ftpfile ALL NOREQ'
  165.                     endif
  166.                 endif
  167.                 setvar stat 1
  168.             elseif $lokfile = ""
  169.                 setvar stat 0
  170.             endif
  171.         else
  172.             Update #This 2 "FTPAdresse stimmt nicht!"
  173.             GuiWindow HTMLEXT RESUME
  174.             GuiWindow #This RESUME
  175.             STOP
  176.         endif
  177.         LVMulti OFF
  178.         LVMulti Show
  179.         LVMulti First
  180.         Counter stand INC 1
  181.     endwhile
  182.     GuiWindow HTMLEXT RESUME
  183.     GuiWindow #This RESUME
  184.     if $stat = 1
  185.         Update "infobar" 1 "Upload erfolgreich durchgeführt."
  186.     else
  187.         Update "infobar" 1 "Upload konnte nicht durchgeführt werden!"
  188.     endif
  189.     GuiQuit #This
  190.  
  191.  
  192. xButton 110 40 70 20 "_3 Download (vOL)"
  193.     GadID 666
  194.     GadFont "xHelvetica.font" "11" 000
  195.     GadKey "x"
  196.     GuiWindow HTMLEXT WAIT
  197.     GuiWindow #This WAIT
  198.     SetVar stand "1"
  199.     lvuse HTMLEXT 1
  200.     EXTRACT %SitePath CLEAN slpath
  201.     EXTRACT %SiteFTPOL CLEAN sfpath
  202.     LVUSE HTMLEXT 3
  203.     LVMulti First
  204.     while $$lv.line > ""
  205.         SetVar lokdir $$lv.dir
  206.         SetVar ftpdir $lokdir
  207.         RepVar ftpdir $slpath $sfpath CI
  208.         JoinFile $$lv.dir $$lv.rec lokfile
  209.         SetVar ftpfile $lokfile
  210.         repvar ftpfile $slpath $sfpath CI
  211.         if $ftpfile != $lokfile
  212.             if $lokfile != ""
  213.                 INFO FILE $lokfile
  214.                 if $$FILE.TYPE != "DIR"
  215.                     Update Infobar 1 "Kopiere Datei $ftpfile nach $lokfile ..."
  216.                     Update #This 2 "($stand) $$lv.rec"
  217.                     CLI 'copy $ftpfile TO $lokfile'
  218.                 else
  219.                     EXTRACT lokdir FILE dirn
  220.                     Update Infobar 1 "Kopiere Verzeichnis $lokfile nach $ftpfile ..."
  221.                     Update #This 2 "($stand)D $$lv.rec"
  222.                     cli 'copy $ftpfile TO $lokfile ALL NOREQ'
  223.                 endif
  224.                 setvar stat 1
  225.             elseif $lokfile = ""
  226.                 setvar stat 0
  227.             endif
  228.         else
  229.             Update #This 2 "FTPAdresse stimmt nicht!"
  230.             GuiWindow HTMLEXT RESUME
  231.             GuiWindow #This RESUME
  232.             STOP
  233.         endif
  234.         LVMulti OFF
  235.         LVMulti Show
  236.         LVMulti First
  237.         Counter stand INC 1
  238.     endwhile
  239.     GuiWindow HTMLEXT RESUME
  240.     GuiWindow #This RESUME
  241.     if $stat = 1
  242.         Update "infobar" 1 "Download erfolgreich durchgeführt."
  243.     else
  244.         Update "infobar" 1 "Download konnte nicht durchgeführt werden!"
  245.     endif
  246.     GuiQuit #This
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.     GuiWindow HTMLEXT WAIT
  273.     GuiWindow #This WAIT
  274.     SetVar stand "0"
  275.     lvuse HTMLEXT 1
  276.     EXTRACT %SitePath CLEAN spath
  277.     EXTRACT %SiteFTPOL CLEAN fpath
  278.     EXTRACT %SiteServTyp CLEAN servertyp
  279.     LVUSE HTMLEXT 3
  280.     LVMulti First
  281.     while $$lv.line > ""
  282.         JoinFile $$lv.dir $$lv.rec lokfile
  283.         ftpfile = $lokfile
  284.         repvar ftpfile "$lokdir" "$ftpol" CI
  285.         if $lokfile != ""
  286.             if $ftpfile != $lokfile
  287.                 Update #This 3 "($stand) $$lv.rec"
  288.                 Update Infobar 1 "Kopiere Datei $ftpfile vom Online FTP Server nach $lokfile ..."
  289.                 CLI 'copy $ftpfile TO $lokfile'
  290.             else
  291.                 Update #This 3 "ACHTUNG: Lokdir = FTPDir!!"
  292.                 GuiWindow HTMLEXT RESUME
  293.                 GuiWindow #This RESUME
  294.                 STOP
  295.             endif
  296.             setvar stat 1
  297.         else
  298.             setvar stat 0
  299.         endif
  300.         LVMulti OFF
  301.         LVMulti Show
  302.         LVMulti First
  303.         Counter stand INC 1
  304.     endwhile
  305.     if $stat = 1
  306.         Update "infobar" 1 "Download erfolgreich durchgeführt."
  307.     else
  308.         Update "infobar" 1 "Download konnte nicht durchgeführt werden!"
  309.     endif
  310.     GuiWindow HTMLEXT RESUME
  311.     GuiWindow #This RESUME
  312.     GuiQuit #This
  313.  
  314. xButton 180 40 70 20 "[_X] Abbrechen"
  315.     GadFont "xHelvetica.font" "11" 000
  316.     GadKey "x"
  317.     GuiQuit #This
  318.  
  319.